import 'package:flutter/material.dart';
import '../utils/adapt.dart';
// import 'package:provider/provider.dart';

class FloorTitle extends StatelessWidget {
  final t1;
  final t2;
  final callback;
  const FloorTitle(this.t1, {Key? key, this.t2, this.callback})
      : super(key: key);

  @override
  Widget build(BuildContext context) {
    return InkWell(
      onTap: () {
        callback != null ? callback() : print("没有回掉");
      },
      child: Container(
        padding: EdgeInsets.symmetric(
            horizontal: Adapt.px(20), vertical: Adapt.px(10)),
        child: Row(
          mainAxisAlignment: MainAxisAlignment.spaceBetween,
          children: [
            Container(
              child: Row(
                children: [
                  Text(
                    "$t1",
                    style: TextStyle(
                      color: Colors.black,
                      fontSize: Adapt.px(35),
                      fontWeight: FontWeight.w600,
                    ),
                  ),
                  Text(
                    t2 != null ? " | $t2" : "",
                    style: TextStyle(
                      color: Colors.black45,
                      fontSize: Adapt.px(35),
                      fontWeight: FontWeight.w600,
                    ),
                  ),
                ],
              ),
            ),
            Container(
              padding: EdgeInsets.symmetric(
                  vertical: Adapt.px(4), horizontal: Adapt.px(16)),
              decoration: BoxDecoration(
                border: Border.all(
                  color: Colors.black26,
                  width: Adapt.px(2),
                ),
                borderRadius: BorderRadius.circular(Adapt.px(28)),
              ),
              child: Text(
                "更多>",
                style: TextStyle(height: 1.2, fontSize: Adapt.px(28)),
              ),
            ),
          ],
        ),
      ),
    );
  }
}
